package cn.wx.scholar.core.service;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.fastjson.JSONObject;

import cn.wx.scholar.core.entity.ResultFromYeeSight;
import cn.wx.scholar.core.entity.qo.SocialYeeSightQ;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author
 * @since 2018-11-02
 */
@Service
@Transactional
public class SocialFromYeeSightService extends YeeSightService {
	
	/**
	 * 根据专家和机构查社交分页
	 */
	public ResultFromYeeSight getSearchResult(SocialYeeSightQ socialQ) {
		String param = null;
		try {
			param = URLEncoder.encode(JSONObject.toJSONString(socialQ), "utf-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return getResult(param, "social");
	}
}
